<?php TPL::output('aomas/global/header.tpl.htm'); ?>
<link rel="stylesheet" href="<?php echo G_STATIC_URL; ?>/aomas/css/common/swiper.min.css">
<!-- <link rel="stylesheet" href="<?php echo G_STATIC_URL; ?>/aomas/css/common/jquery.jqzoom.css"> -->
<!-- <link rel="stylesheet" href="<?php echo G_STATIC_URL; ?>/aomas/css/common/a.css"> -->

<link rel="stylesheet" href="<?php echo G_STATIC_URL; ?>/aomas/css/shop_info/shop_info.css">

        <div class="shop-info">
            <?php TPL::output('aomas/global/nav.tpl.htm'); ?>


            <div class="shop-info-section">
                <div class="row">
                    <div class="col-md-5 col-sm-5 col-xs-5" style="position: static;">
                        <div class="shop-img">
                            <div class="am-table">
                                <div class="am-tablecell" id="demo" style="position: relative;">
                                    <div id="small-box" style="width: 400px;overflow: hidden;text-align: center">
                                        <div id="mark"></div>
                                        <div id="float-box"></div> 
                                        <img id="preview-img" src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'mid',$this->goods_info['cover']); ?>"/>
                                    </div>
                                    <div id="big-box">
                                        <div class="am-table">
                                            <div class="am-tablecell">
                                                <img  id="big-img" src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'mid',$this->goods_info['cover']); ?>"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="shop-img-list">
                                <div class="shop-img-prev">
                                    <img src="<?php echo G_STATIC_URL; ?>/aomas/img/common/left-arrow.png" alt="">
                                </div>
                                <div class="shop-img-next">
                                    <img src="<?php echo G_STATIC_URL; ?>/aomas/img/common/right-arrow.png" alt="">
                                </div>
                                <div class="swiper-container">
                                    <div class="swiper-wrapper">

                                        <?php foreach($this->goods_photos as $key=>$item){ ?>
                                        <div  class="swiper-slide" data-src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'info',$item['file_location']); ?>" >
                                            <img alt=""  src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'min',$item['file_location']); ?>">
                                        </div>
                                        <?php }?>
                                        <?php foreach($this->goods_style_list as $key=>$item){ ?>
                                        <div class="swiper-slide" data-src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'info',$item['goods_color_pic']); ?>">
                                            <img alt="" src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'min',$item['goods_color_pic']); ?>" >
                                        </div>
                                        <?php }?>
                                    
                                    </div>
                                  
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="col-md-6 col-sm-6 col-xs-6 col-md-offset-1 col-sm-offset-1 col-xs-offset-1">
                        <div class="shop-li-group">
                            <p class="shop-name"><?php echo $this->goods_info['goods_name']; ?></p>
                            <p class="shop-des"><?php echo $this->goods_info['goods_brief']; ?></p>

                        </div>  

                        <div class="shop-li-group">
                            <div class="am-table">
                                <div class="am-tablecell">
                                   
                                    <div class="shop-label">
                                        <span class="shop-icon">
                                            <img src="<?php echo G_STATIC_URL; ?>/aomas/img/common/pos.png" alt="">
                                        </span>
                                        <span class="shop-label-text">售</span>
                                    </div>
                                   
                                    <div class="shop-label-content">

                                        <ul class="shop-citys">
                                            <li>全国</li>
                                        </ul>

                                    </div>
                                   
                                </div>
                            </div>
                            
                        </div>  

                        <!--<div class="shop-li-group">-->
                            <!--<div class="am-table">-->
                                <!--<div class="am-tablecell">-->
                                    <!--<div class="shop-label">-->
                                        <!--<span class="shop-label-text">促销活动</span>-->
                                    <!--</div>-->
                                  <!---->
                                    <!--<div class="shop-label-content">-->
                                        <!--<span class="shop-quan">领券</span>-->
                                        <!--<span class="shop-more">澳玛仕优惠券</span>-->
                                        <!--<a href="javascript:;" class="shop-city-change">现在领取</a>-->
                                    <!--</div>-->
                                 <!---->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div> -->

                        <div class="shop-li-group">
                            <div class="am-table">
                                <div class="am-tablecell">
                                    <div class="shop-label">
                                        <span class="shop-label-text">产品机型</span>
                                    </div>

                                    <div class="shop-label-content">
                                        <ul class="shop-type">
                                            <?php foreach($this->goods_model_list as $key=>$val){ ?>
                                                <li data-style="<?php echo $val['id'];?>" data-src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'info',$val['goods_color_pic']); ?>">
                                                    <?php echo $val['goods_model'];?>
                                                </li>
                                            <?php }?>
                                        </ul>
                                    </div>
                                    
                                </div>
                            </div>
                        </div> 

                        <div class="shop-li-group">
                            <div class="am-table">
                                <div class="am-tablecell">
                                    <div class="shop-label">
                                        <span class="shop-label-text">颜色机型</span>
                                    </div>

                                    <div class="shop-label-content">
                                        <ul class="shop-color">

                                            <?php foreach($this->goods_style_list as $key=>$val){ ?>

                                            <li  data-style="<?php echo $val['id'];?>" data-color="<?php echo $val['goods_color'];?>" data-src="<?php echo get_goods_cover_url($this->goods_info['goods_id'],'info',$val['goods_color_pic']); ?>">
                                                <div class="shop-color-body">
                                                    <span style="background: <?php echo $val['goods_color'];?>"></span>
                                                </div>
                                                <div class="shop-color-name">
                                                    <?php echo $val['goods_color_name'];?>
                                                </div>
                                            </li>
                                            <?php }?>
                                           
                                        </ul>
                                    </div>
                                    
                                </div>
                            </div>
                        </div> 

                        <div class="shop-info-price">
                            <p class="shop-info-select">
                                <span></span>
                                <span>  </span>
                            </p>
                            <p class="shop-final-price">
                                总计： <?php echo $this->goods_info['shop_price'];?>元
                            </p>
                        </div>

                        <p class="shop-promise hidden">
                            <span>分期付款</span>
                            <span>中国建设银行</span>
                        </p>

                        <a href="<?php echo $this->goods_info['jd_url'];?>" class="shop-go">
                            <img src="<?php echo G_STATIC_URL; ?>/aomas/common/jd.png" alt="">
                            前往京东购买
                        </a>
                        <a href="<?php echo $this->goods_info['tb_url'];?>" class="shop-go">
                            <img src="<?php echo G_STATIC_URL; ?>/aomas/common/tm.png" alt="">
                            前往淘宝购买
                        </a>

                        <p class="shop-promise">
                            <span>服务说明</span>
                            <span>本商品全国联保，正品保证，只换不修</span>
                        </p>

                    </div>
                </div>

                <div class="shop-intro">
                 <!--图片内容-->
                </div>

            </div>

            <!-- 尾部全局 -->
            <?php TPL::output('aomas/global/footer.tpl.htm'); ?>


        </div>
        <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
        <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
        <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
        <script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/jquery.colorbox-min.js" type="text/javascript"></script>
        <!-- <script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/jqzoom.js" type="text/javascript"></script>    -->
        <script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/swiper.min.js"></script>
        <!-- <script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/jquery.jqzoom-core.js" type="text/javascript"></script>   -->
        <!-- <script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/a.js" type="text/javascript"></script>    -->
        <script src="<?php echo G_STATIC_URL; ?>/aomas/js/shop_info/shop_info.js" type="text/javascript"></script>

        <script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/jquery.lazyload.min.js" type="text/javascript"></script>
<script>

    $(function() {

        var detail =  '<?php echo $this->goods_info["goods_desc"];?>';


        $(detail).find("img").map(function (index,item) {

            $(item).addClass('lazy').css({'min-height':'200px','min-width':'500px'});
            item.setAttribute('data-original',item.src);
            item.removeAttribute('src');
            $(".shop-intro").append(item);
        });
        $("img.lazy").lazyload({
            placeholder : "<?php echo G_STATIC_URL; ?>/aomas/loading.gif",
            threshold :10,
            effect: "fadeIn"
        });
    });
</script>
<!-- <script>
        $("#etalage").zoom({
            zoom_area_width: 470,
            zoom_area_height: 400,
            thumb_image_width: 470,
            thumb_image_height: 400,
            source_image_width: 940,    // 放大图片的宽
            source_image_height: 800,  // 放大图片的高
            autoplay_interval :3000,
            small_thumbs : 5,
            autoplay : false
        });
        </script> -->


     </body>
</html>